import 'package:flutter/material.dart';

///**
///* @author hrongyong
///* @date   3/4/21
///* @email hrongyong@gmail.com
///* Description: 分层蛋糕饼图model
///*/
class LayeredCakePieChartModel {
  ///主饼块
  CakePiecesModel mainCake;

  ///副饼块
  List<CakePiecesModel> viceCake;

  LayeredCakePieChartModel({this.mainCake, this.viceCake});
}

class CakePiecesModel {
  ///蛋糕饼块大小
  double cakeSize;

  ///蛋糕饼块颜色
  Color cakeColor;

  ///蛋糕饼块描述
  String cakeDescription;

  CakePiecesModel({this.cakeSize = 0.0, this.cakeColor = Colors.white, this.cakeDescription = ""}) {
    if (cakeSize == null || cakeSize < 0) cakeSize = 0.0;
    if (cakeColor == null) cakeColor = Colors.white;
  }
}
